package router

import (
	"github.com/gin-gonic/gin"
	"onerk4/zk1/api/controller"
	"onerk4/zk1/api/middleware"
	"onerk4/zk1/pkg"
)

func LoadRouter(r *gin.Engine) {
	user := r.Group("/user")
	{
		user.POST("/send/sms", controller.SendSms)
		user.POST("/login", controller.Login)
	}
	order := r.Group("/order")
	{
		order.Use(middleware.Middleware())
		order.Use(pkg.JWTAuth("2209a"))
		order.POST("/create/order", controller.CreateOrder)
		order.GET("/list/order", controller.ListOrder)
	}
}
